package com.ys.entity.sys;

import java.util.Date;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="YS_ProcInst", catalog="Id")
public class YsProcInst extends BaseEntity<YsProcInst> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="DefId", nameJava="defId", typeDataBase="bigint")
	private Long defId;
	@YsField(nameDataBase="TaskId", nameJava="taskId", typeDataBase="bigint")
	private Long taskId;
	@YsField(nameDataBase="Bid", nameJava="bid", typeDataBase="varchar")
	private String bid;
	@YsField(nameDataBase="StateFlow", nameJava="stateFlow", typeDataBase="int")
	private Integer stateFlow;
	@YsField(nameDataBase="CreateUserId", nameJava="createUserId", typeDataBase="varchar")
	private String createUserId;
	@YsField(nameDataBase="CurrentAuditId", nameJava="currentAuditId", typeDataBase="bigint")
	private Long currentAuditId;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public YsProcInst setId(Long id) {
		this.id = id;
		return this;
	}
	public Long getDefId() {
		return defId;
	}
	public YsProcInst setDefId(Long defId) {
		this.defId = defId;
		return this;
	}
	public Long getTaskId() {
		return taskId;
	}
	public YsProcInst setTaskId(Long taskId) {
		this.taskId = taskId;
		return this;
	}
	public String getBid() {
		return bid;
	}
	public YsProcInst setBid(String bid) {
		this.bid = bid;
		return this;
	}
	public Integer getStateFlow() {
		return stateFlow;
	}
	public YsProcInst setStateFlow(Integer stateFlow) {
		this.stateFlow = stateFlow;
		return this;
	}
	public String getCreateUserId() {
		return createUserId;
	}
	public YsProcInst setCreateUserId(String createUserId) {
		this.createUserId = createUserId;
		return this;
	}
	public Long getCurrentAuditId() {
		return currentAuditId;
	}
	public YsProcInst setCurrentAuditId(Long currentAuditId) {
		this.currentAuditId = currentAuditId;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public YsProcInst setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public YsProcInst setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public YsProcInst setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static YsProcInst ysProcInst(
		Long defId,
		Long taskId,
		String bid,
		Integer stateFlow,
		String createUserId,
		Long currentAuditId,
		Integer status
			) {
		YsProcInst entity = new YsProcInst();
		entity.setDefId(defId);
		entity.setTaskId(taskId);
		entity.setBid(bid);
		entity.setStateFlow(stateFlow);
		entity.setCreateUserId(createUserId);
		entity.setCurrentAuditId(currentAuditId);
		entity.setStatus(status);
		return entity;
	}
}